/**
 * Copyright (C), 2015-2018, XXX有限公司
 * FileName: QuartzTest2
 * Author:   周宏硕
 * Date:     2018/12/19 16:29
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.ht.temp.configurations.component;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author 周宏硕
 * @create 2018/12/19
 * @since 1.0.0
 */
@DisallowConcurrentExecution
public class QuartzTest2  implements Job {


    private SimpleDateFormat dateFormat() {
        return new SimpleDateFormat("HH:mm:ss");
    }

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        //这里写job代码，就是这个任务，具体要实现什么，就在这里写
        System.out.println("BBBB: The time is now " + dateFormat().format(new Date()));
    }
}
